How to Fix FTP Permission Errors on Google Cloud – One Page Zen 您所在的位置:网站首页 DMA error message when using FTP or SSH Issue How to Fix FTP Permission Errors on Google Cloud – One Page Zen

How to Fix FTP Permission Errors on Google Cloud – One Page Zen

2024-06-18 19:47| 来源: 网络整理| 查看: 265

Are you getting Permission denied errors when trying to edit your Google Cloud Platform files via FTP?

In this tutorial you will learn how to fix Permission denied errors that occur when trying to save and upload changes to Google Cloud Platform files that you’ve downloaded and edited over FTP.

Before starting this tutorial, you should have already configured an FTP client to work with your website on Google Cloud Platform.

There are 6 steps in this tutorial: 1. Identify Error 2. Connect to VM Instance 3. Check File Permissions 4. Edit File Permissions 5. Restart Apache 6. Retry File Upload

1. Identify Error

What is a Permission denied error in FTP, and what does it look like?

Permission denied errors occur when you don’t have the required permissions to make changes to a file that you’re trying to edit over FTP.

fix ftp permission errors google cloudIn the image above, the user is attempting to save changes to their website’s wordpress.conf file via FTP. fix ftp permission errors google cloudBecause the user does not have the required permissions to save changes to the wordpress.conf file, the FTP console is showing Permission denied – File transfer failed.

2. Connect to VM Instance

In order to fix the problem, you will need to edit the file’s permissions in Google Cloud Platform. This requires you to connect to your VM instance using the SSH (Linux Shell) terminal.

fix ftp permission errors google cloudGo to your Google Cloud homepage and click the hamburger menu in the upper left-hand corner. fix ftp permission errors google cloudGo to your Compute Engine, then to VM instances to access your VM instance. fix ftp permission errors google cloudClick on the SSH button to connect to your website via SSH.

3. Check File Permissions

Now that you’ve connected to your website via SSH, the first step is to check the permissions of the file you want to edit. In this example, the user would be checking the permissions of the wordpress.conf file.

To do this, execute the following command:

stat -c "%a %n" /path/to/file ftp permission errors google cloudIn the image above, the command stat -c “%a %n” /etc/apache2/sites-available/wordpress.conf is used to check the permissions of the wordpress.conf file. As you can see from the image, the file’s permissions are set to 644.

4. Edit File Permissions

Because the file’s permissions are set to 644, you would not have sufficient permissions to edit the file via FTP. To fix this problem, you are going to change the file’s permissions from 644 to 777, thereby granting all permissions.

To do this, run the following command:

sudo chmod 777 /path/to/file ftp permission errors google cloudIn the image above, the command sudo chmod 777 /etc/apache2/sites-available/wordpress.conf is executed in order to change the permissions of the wordpress.conf file from 644 to 777.

5. Restart Apache

For changes to take affect, you will need to restart your Apache server.

ftp permission errors google cloudIn the image above, the command sudo service apache2 graceful is executed to restart the server in order for file permission changes to take effect.

For most Apache configurations, run the following restart command:

sudo service apache2 graceful

For Bitnami Apache configurations, run the following restart command:

sudo /opt/bitnami/ctlscript.sh restart apache

6. Retry File Upload

Go back to your FTP Client and try uploading the saved file again. Now that the file has permissions of 777, you will be able to upload it to your server successfully via FTP.

ftp permission errors google cloudIn the image above, the edited wordpress.conf file is successfully uploaded to the server via FTP after changing the file’s permissions from 644 to 777. Did it Work?

With the use of chmod 777, you should now be able to avoid Permission denied errors when uploading files via FTP.

If you have any questions or comments, please post them below!

Thanks,

signature

Up Next… ssh linux permission errors google cloudSetup Contact Forms for WordPress on Google Cloud how to setup email for websites on google cloud platformHow to setup email for websites on Google Cloud Platform


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有